Cleanup: move visibility/linkage attributes to the first declaration. This change moves visibility attributes from out-of-class method definitions to in-class declaration. This is needed for a switch to attribute((internal_linkage)) (see http://reviews.llvm.org/D13925) which can only appear on the first declaration. This change does not touch istream/ostream/streambuf. They are handled separately in http://reviews.llvm.org/D14409. git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@252385 91177308-0d34-0410-b5e6-96231b3b80d8 
diff --git a/include/deque b/include/deque index c10bd36..b0b778a 100644 --- a/include/deque +++ b/include/deque 
@@ -964,8 +964,10 @@  _LIBCPP_INLINE_VISIBILITY  const allocator_type& __alloc() const _NOEXCEPT {return __size_.second();}   + _LIBCPP_INLINE_VISIBILITY  __deque_base()  _NOEXCEPT_(is_nothrow_default_constructible<allocator_type>::value); + _LIBCPP_INLINE_VISIBILITY  explicit __deque_base(const allocator_type& __a);  public:  ~__deque_base(); @@ -1090,13 +1092,13 @@  }    template <class _Tp, class _Allocator> -inline _LIBCPP_INLINE_VISIBILITY +inline  __deque_base<_Tp, _Allocator>::__deque_base()  _NOEXCEPT_(is_nothrow_default_constructible<allocator_type>::value)  : __start_(0), __size_(0) {}    template <class _Tp, class _Allocator> -inline _LIBCPP_INLINE_VISIBILITY +inline  __deque_base<_Tp, _Allocator>::__deque_base(const allocator_type& __a)  : __map_(__pointer_allocator(__a)), __start_(0), __size_(0, __a) {}   @@ -1241,8 +1243,11 @@  #endif // _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS    #ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES + _LIBCPP_INLINE_VISIBILITY  deque(deque&& __c) _NOEXCEPT_(is_nothrow_move_constructible<__base>::value); + _LIBCPP_INLINE_VISIBILITY  deque(deque&& __c, const allocator_type& __a); + _LIBCPP_INLINE_VISIBILITY  deque& operator=(deque&& __c)  _NOEXCEPT_(__alloc_traits::propagate_on_container_move_assignment::value &&  is_nothrow_move_assignable<allocator_type>::value); @@ -1261,6 +1266,7 @@  void assign(initializer_list<value_type> __il) {assign(__il.begin(), __il.end());}  #endif // _LIBCPP_HAS_NO_GENERALIZED_INITIALIZERS   + _LIBCPP_INLINE_VISIBILITY  allocator_type get_allocator() const _NOEXCEPT;    // iterators: @@ -1313,13 +1319,21 @@  bool empty() const _NOEXCEPT {return __base::size() == 0;}    // element access: + _LIBCPP_INLINE_VISIBILITY  reference operator[](size_type __i); + _LIBCPP_INLINE_VISIBILITY  const_reference operator[](size_type __i) const; + _LIBCPP_INLINE_VISIBILITY  reference at(size_type __i); + _LIBCPP_INLINE_VISIBILITY  const_reference at(size_type __i) const; + _LIBCPP_INLINE_VISIBILITY  reference front(); + _LIBCPP_INLINE_VISIBILITY  const_reference front() const; + _LIBCPP_INLINE_VISIBILITY  reference back(); + _LIBCPP_INLINE_VISIBILITY  const_reference back() const;    // 23.2.2.3 modifiers: @@ -1358,6 +1372,7 @@  iterator erase(const_iterator __p);  iterator erase(const_iterator __f, const_iterator __l);   + _LIBCPP_INLINE_VISIBILITY  void swap(deque& __c)  #if _LIBCPP_STD_VER >= 14  _NOEXCEPT; @@ -1365,6 +1380,7 @@  _NOEXCEPT_(!__alloc_traits::propagate_on_container_swap::value ||  __is_nothrow_swappable<allocator_type>::value);  #endif + _LIBCPP_INLINE_VISIBILITY  void clear() _NOEXCEPT;    _LIBCPP_INLINE_VISIBILITY @@ -1537,7 +1553,7 @@  #ifndef _LIBCPP_HAS_NO_RVALUE_REFERENCES    template <class _Tp, class _Allocator> -inline _LIBCPP_INLINE_VISIBILITY +inline  deque<_Tp, _Allocator>::deque(deque&& __c)  _NOEXCEPT_(is_nothrow_move_constructible<__base>::value)  : __base(_VSTD::move(__c)) @@ -1545,7 +1561,7 @@  }    template <class _Tp, class _Allocator> -inline _LIBCPP_INLINE_VISIBILITY +inline  deque<_Tp, _Allocator>::deque(deque&& __c, const allocator_type& __a)  : __base(_VSTD::move(__c), __a)  { @@ -1557,7 +1573,7 @@  }    template <class _Tp, class _Allocator> -inline _LIBCPP_INLINE_VISIBILITY +inline  deque<_Tp, _Allocator>&  deque<_Tp, _Allocator>::operator=(deque&& __c)  _NOEXCEPT_(__alloc_traits::propagate_on_container_move_assignment::value && @@ -1641,7 +1657,7 @@  }    template <class _Tp, class _Allocator> -inline _LIBCPP_INLINE_VISIBILITY +inline  _Allocator  deque<_Tp, _Allocator>::get_allocator() const _NOEXCEPT  { @@ -1700,7 +1716,7 @@  }    template <class _Tp, class _Allocator> -inline _LIBCPP_INLINE_VISIBILITY +inline  typename deque<_Tp, _Allocator>::reference  deque<_Tp, _Allocator>::operator[](size_type __i)  { @@ -1709,7 +1725,7 @@  }    template <class _Tp, class _Allocator> -inline _LIBCPP_INLINE_VISIBILITY +inline  typename deque<_Tp, _Allocator>::const_reference  deque<_Tp, _Allocator>::operator[](size_type __i) const  { @@ -1718,7 +1734,7 @@  }    template <class _Tp, class _Allocator> -inline _LIBCPP_INLINE_VISIBILITY +inline  typename deque<_Tp, _Allocator>::reference  deque<_Tp, _Allocator>::at(size_type __i)  { @@ -1729,7 +1745,7 @@  }    template <class _Tp, class _Allocator> -inline _LIBCPP_INLINE_VISIBILITY +inline  typename deque<_Tp, _Allocator>::const_reference  deque<_Tp, _Allocator>::at(size_type __i) const  { @@ -1740,7 +1756,7 @@  }    template <class _Tp, class _Allocator> -inline _LIBCPP_INLINE_VISIBILITY +inline  typename deque<_Tp, _Allocator>::reference  deque<_Tp, _Allocator>::front()  { @@ -1749,7 +1765,7 @@  }    template <class _Tp, class _Allocator> -inline _LIBCPP_INLINE_VISIBILITY +inline  typename deque<_Tp, _Allocator>::const_reference  deque<_Tp, _Allocator>::front() const  { @@ -1758,7 +1774,7 @@  }    template <class _Tp, class _Allocator> -inline _LIBCPP_INLINE_VISIBILITY +inline  typename deque<_Tp, _Allocator>::reference  deque<_Tp, _Allocator>::back()  { @@ -1767,7 +1783,7 @@  }    template <class _Tp, class _Allocator> -inline _LIBCPP_INLINE_VISIBILITY +inline  typename deque<_Tp, _Allocator>::const_reference  deque<_Tp, _Allocator>::back() const  { @@ -2806,7 +2822,7 @@  }    template <class _Tp, class _Allocator> -inline _LIBCPP_INLINE_VISIBILITY +inline  void  deque<_Tp, _Allocator>::swap(deque& __c)  #if _LIBCPP_STD_VER >= 14 @@ -2820,7 +2836,7 @@  }    template <class _Tp, class _Allocator> -inline _LIBCPP_INLINE_VISIBILITY +inline  void  deque<_Tp, _Allocator>::clear() _NOEXCEPT  {